//
//  NSString+UrlEncode.m
//  GIFShow
//
//  Created by lanou11air029 on 15/4/10.
//  Copyright (c) 2015年 CK. All rights reserved.
//

#import "NSString+UrlEncode.h"

@implementation NSString (UrlEncode)
- (NSString *)URLEncodedString
{
    NSString *encodedString = (NSString *)
    CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                            (CFStringRef)self,
                                            (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]",
                                            NULL,
                                            kCFStringEncodingUTF8);
    return encodedString;
}

@end
